﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Axis.Dao.Config;
using Axis.BusinessObject;

namespace Sotipha.Web.Views.Home
{
    public partial class Default : CPage
    {
        public string LinkBanner = "#";
        protected void Page_Load(object sender, EventArgs e)
        {
            CConfigDao core = new CConfigDao();
            string inputValue = string.Format("<InputValue ID=\"{0}\"/>", 2);
            IList<CConfigSite> list = core.GetConfigSite(inputValue);
            if(list!=null)
                if (list.Count > 0){
                    this.LinkBanner = list[0].Link;
                    if (Session["lang"].ToString() == "vi")
                        ltrBanner.Text = string.Format("<img src=\"{0}\" />", list[0].Banner_VI);
                    else
                        ltrBanner.Text = string.Format("<img src=\"{0}\" />", list[0].Banner_EN);
                    }
        }
    }
}